package com.zhuss.controller.team;

import com.zhuss.bean.bo.team.information.SearchInfoSonBo;
import com.zhuss.common.BaseController;
import com.zhuss.common.ReadService;
import com.zhuss.exception.WpsException;
import com.zhuss.team.informationSon.InformationSonReadServiceExt;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author: zhushanshuo
 * @Date: 2020/3/3 15:19
 */
@RestController
@RequestMapping("/informationSon")
public class InformationSonReadController extends BaseController {

    @Autowired
    @Qualifier("informationSonReadService")
    private ReadService<Object, Object> informationSonReadService;

    @Autowired
    @Qualifier("informationSonReadServiceExt")
    private InformationSonReadServiceExt informationSonReadServiceExt;


    /**
     * 获取信息待阅列表
     * @throws WpsException
     */
    @ResponseBody
    @RequestMapping("/stayList")
    public Object stayList(@RequestBody SearchInfoSonBo bo) throws WpsException {
        Object result = informationSonReadServiceExt.stayList(bo);
        return result;
    }

    /**
     * 获取信息已阅列表
     * @throws WpsException
     */
    @ResponseBody
    @RequestMapping("/alreadyList")
    public Object alreadyList(@RequestBody SearchInfoSonBo bo) throws WpsException {
        Object result = informationSonReadServiceExt.alreadyList(bo);
        return result;
    }
}
